------------- jQuery and flot http://jquery.com/ ------------- javaScript is a "client-side" language for web programming. (We've been using Perl for "server-side" programming.) JavaScript code is executed by the user's browser/computer and is often contained in the HTML page itself using or in this manner if I use an "absolute" path: For the purposes of lecture, you should probably use the absolute path and specify MY server. That was you can play around with things right away and worry about setting up jquery on your own server at another time. (Setting it up shouldn't take long, but if you're using the File Manager on Netfirms, it will take a while since [I don't think] you can copy entire directories at once, whereas you can do so with most FTP programs.) Try setting it up on your own server later today. ------------- flot ------------- Flot is a pure Javascript plotting library for jQuery. It produces graphical plots of arbitrary datasets on-the-fly client-side. The focus is on simple usage (all settings are optional), attractive looks, and interactive features like zooming and mouse tracking. For our purposes, flot is a powerful tool for providing graphical feedback to our research participants or for ourselves. You can download the flot library here: http://code.google.com/p/flot/ You should unzip and copy the directory to your jquery directory. You can also load this library within a page via the following script line: Or, using absolute pathing, When flot is used, you also need the basic jquery library. As such, in most flotting applications, you'll have something like this at the top of each Perl script: print " "; ------------- Some flot examples ------------- There are some nice examples of the use of flot plots at the following location: http://people.iola.dk/olau/flot/examples/ We'll discuss these in class before moving on to the class-specific examples. Create a CSS object that will "hold" the graph. print "
"; The basic call for a flot: